Skip to content

[PoC] Automated regression testing of manual XCP-ng installation - #643

Draft
vxgmichel wants to merge 2 commits into
masterfrom
vml/auto-install-with-tui-poc-2
Draft

[PoC] Automated regression testing of manual XCP-ng installation#643
vxgmichel wants to merge 2 commits into
masterfrom
vml/auto-install-with-tui-poc-2

Conversation

@vxgmichel

@vxgmichel vxgmichel commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

The automated installation tests rely on creating an answerfile with the proper configuration, and remastering the chosen install ISO in order to use that answerfile by default. This is convenient to create all kinds of different configuration, but it does not test the manuel install process since the TUI is completely avoided.

This proof of concept shows that a manual installation can also be automated in order to test for potential regression in the TUI. More specifically, this PR introduces a couple of tests, following the dependency convention introduced in tests/install/test.py:

± uv run pytest --hosts 10.1.0.11 tests/install/with_tui.py --co -q
tests/install/with_tui.py::test_install_with_tui[uefi-83nightly-iso-ext]
tests/install/with_tui.py::test_tune_firstboot[None-uefi-83nightly-host1-iso-ext]
tests/install/with_tui.py::test_tune_firstboot[None-uefi-83nightly-host2-iso-ext]
tests/install/with_tui.py::test_boot_inst[uefi-83nightly-host1-iso-ext]
tests/install/with_tui.py::test_boot_inst[uefi-83nightly-host2-iso-ext]

The interesting part is the test_install_with_tui test. Here's what it does:

  • It creates a new VM in an L0 pool, using a configuration similar to what happens in tests/isntall/test.py. One notable difference is that it sets platform:hvm_serial to pty
  • It uploads the selected nightly ISO to the ISO SR of the L0 pool (it also caches the ISO, although this part was mainly introduced to speedup the development process). Note that it does not require any remastering.
  • It inserts the install ISO and start the VM. Then it connects to the serial line by ssh-ing to the resident host and using xl console -t serial $domain_id
  • Note that paramiko is used to allocate a pty. This allows proper control of the interactive sessions. The test logs the installation message, and then navigate through the dialogs, mostly using the default options.
  • It then install XCP-ng, and shutdown once the installation is completed. The nested host is then cached for the upcoming test_tune_firstboot test.

Note that the nested hosts produced by test_boot_inst can run the postinstall test job:

uv run jobs.py run postinstall "cache://install.with_tui::boot_inst[uefi-83nightly-host1-iso-ext]-vm1-c6b8d6ef415549749ed22d0b155a9dc200c55824" --nest 10.1.0.11

@vxgmichel
vxgmichel force-pushed the vml/auto-install-with-tui-poc-2 branch 3 times, most recently from 8622528 to ea9bf9f Compare July 29, 2026 21:14
Signed-off-by: Vincent Michel <vincent.michel@vates.tech>
Signed-off-by: Vincent Michel <vincent.michel@vates.tech>
@vxgmichel
vxgmichel force-pushed the vml/auto-install-with-tui-poc-2 branch from ea9bf9f to 0cc574a Compare July 30, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant